package com.t282.crm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.t282.crm.entity.SysUser;
import com.t282.crm.mapper.SysUserMapper;
import com.t282.crm.service.SysUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Mr.Chen
 * @since 2021-05-19
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Override
    public SysUser getSysUserByUsrNameAndUsrPassword(String usrName, String usrPassword) {

        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<SysUser>();
        queryWrapper.eq("usr_name",usrName);
        queryWrapper.eq("usr_password",usrPassword);

        return baseMapper.selectOne(queryWrapper);
    }

}
